package com.cz.run.beans.mysql;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 用户积分表
 * </p>
 *
 * @author CAIYJ
 * @since 2018-05-23
 */
@TableName("user_point")
public class UserPoint extends Model<UserPoint> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField("user_id")
    private Integer userId;
    /**
     * 用户积分
     */
    private Double point;
    /**
     * 冻结积分 
     */
    @TableField("point_frozen")
    private Double pointFrozen;
    /**
     * 已消费积分
     */
    @TableField("point_consuming")
    private Double pointConsuming;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Double getPoint() {
        return point;
    }

    public void setPoint(Double point) {
        this.point = point;
    }

    public Double getPointFrozen() {
        return pointFrozen;
    }

    public void setPointFrozen(Double pointFrozen) {
        this.pointFrozen = pointFrozen;
    }

    public Double getPointConsuming() {
        return pointConsuming;
    }

    public void setPointConsuming(Double pointConsuming) {
        this.pointConsuming = pointConsuming;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "UserPoint{" +
        ", id=" + id +
        ", userId=" + userId +
        ", point=" + point +
        ", pointFrozen=" + pointFrozen +
        ", pointConsuming=" + pointConsuming +
        "}";
    }
}
